package com.hex.ds.hdrs.log.dao;

import com.hex.bigdata.hbda.base.BaseDao;
import com.hex.bigdata.hbda.base.Page;
import com.hex.ds.hdrs.log.po.MailSendLog;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class MailSendLogDao extends BaseDao {

    public List<MailSendLog> qryMailSendLog(Map map, Page page) {
        return this.selectPage(MailSendLog.class, "com.hex.ds.hdrs.log.dao.MailSendLogDao.qryAll", page, map);
    }

    public int add(MailSendLog mailSendLog) {
        return this.insert("com.hex.ds.hdrs.log.dao.MailSendLogDao.insert", mailSendLog);
    }

    public int updateSendStatus(Map paramMap) {
        return this.update("com.hex.ds.hdrs.log.dao.MailSendLogDao.updateSendStatus", paramMap);
    }

    public List<MailSendLog> qryMailSendLog(Map map) {
        return this.selectList(MailSendLog.class, "com.hex.ds.hdrs.log.dao.MailSendLogDao.qryAll", map);
    }

    public void delTaskByDate(Map map) {
        this.delete("com.hex.ds.hdrs.log.dao.MailSendLogDao.delTaskByDate", map);
    }

    public void reductionMailSendLog(String bitchId) {
        this.insert("com.hex.ds.hdrs.log.dao.MailSendLogDao.reductionMailSendLog", bitchId);
    }
}
